package nuc.jyg.entity;

import java.util.Date;

/**
 * @Author Nuc YongGuang Ji
 * Created by JiYongGuang on 2017/5/27.
 */
public class Appointment {


    private long bookId;//图书id
    private long studentId;//学号
    private Date appointTime;//预约时间

    //多对一的复合属性
    private Book book;//图书实体

    public Appointment() {
    }

    public Appointment(long bookId, long studentId, Date appointTime, Book book) {
        this.bookId = bookId;
        this.studentId = studentId;
        this.appointTime = appointTime;
        this.book = book;
    }

    /**
     * Getter for property 'bookId'.
     *
     * @return Value for property 'bookId'.
     */
    public long getBookId() {
        return bookId;
    }

    /**
     * Setter for property 'bookId'.
     *
     * @param bookId Value to set for property 'bookId'.
     */
    public void setBookId(long bookId) {
        this.bookId = bookId;
    }

    /**
     * Getter for property 'studentId'.
     *
     * @return Value for property 'studentId'.
     */
    public long getStudentId() {
        return studentId;
    }

    /**
     * Setter for property 'studentId'.
     *
     * @param studentId Value to set for property 'studentId'.
     */
    public void setStudentId(long studentId) {
        this.studentId = studentId;
    }

    /**
     * Getter for property 'appointTime'.
     *
     * @return Value for property 'appointTime'.
     */
    public Date getAppointTime() {
        return appointTime;
    }

    /**
     * Setter for property 'appointTime'.
     *
     * @param appointTime Value to set for property 'appointTime'.
     */
    public void setAppointTime(Date appointTime) {
        this.appointTime = appointTime;
    }

    /**
     * Getter for property 'boot'.
     *
     * @return Value for property 'boot'.
     */
    public Book getBook() {
        return book;
    }

    /**
     * Setter for property 'boot'.
     *
     * @param boot Value to set for property 'boot'.
     */
    public void setBook(Book boot) {
        this.book = boot;
    }

    @Override
    public String toString() {
        return "AppointmentDao{" +
                "bookId=" + bookId +
                ", studentId=" + studentId +
                ", appointTime=" + appointTime +
                ", boot=" + book +
                '}';
    }
}
